home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY-2.2 / SCENES / level2 / MTMAND < prev    next >
Text File  |  1993-09-28  |  4KB  |  120 lines

  1. // Persistence of Vision Raytracer
  2. // MTMAND.POV By Dan Farmer
  3. // Modified by Tim Wegner 
  4.  
  5. // Low resolution versions of the images MTMAND.POT and MTMANDJ.GIF are
  6. // included so that you can render this scene, however in order to really
  7. // do the scene justice you should substitute higher resolution versions
  8. // of these images. MTMAND.PAR contains the fractal parameters to generate
  9. // both images using the DOS program FRACTINT.
  10.  
  11. #include "shapes.inc"
  12. #include "colors.inc"
  13. #include "textures.inc"
  14. #declare PlanetColor = color red 0.65 green 0.65 blue 1.00
  15.  
  16. // The following constants simply make it easier to swap images of different
  17. // scales. Change ScaleX and ScaleZ if you generated the MTMAND.POT file at
  18. // a resolution different from 360 x 480 which Dan used.
  19.  
  20. #declare ScaleX = 0.5625    // 360/(pot image width) 
  21. #declare ScaleZ = 1.0       // 480/(pot image height) 
  22.  
  23. camera {
  24.    location <-150.0, 300.0, -650.0>
  25.    direction <0.0, 0.0, 4.0> // "Telephoto" lens, "compresses" distance 
  26.    up <0.0, 1.0, 0.0>        // The distance also seems to smooth the h-field 
  27.    right <4/3, 0.0, 0.0>
  28.    look_at <-40.0, 150.0, 0.0>
  29. }
  30.  
  31. // Define a couple of colors for the light sources.
  32. #declare MainLight = color red 0.8 green 0.8 blue 0.8
  33. #declare FillLight = color red 0.23 green 0.23 blue 0.25
  34. // Light source (main)
  35. light_source { <-400.0, 300.0, -60.0> color MainLight }
  36. // Light source ( shadow filler )
  37. light_source { <-50.0, 300.0, -60.0> color FillLight }
  38.  
  39. height_field  {
  40.    // 16 bit continuous potential Fractint fractal,
  41.    // floating point activated to allow a large bailout value
  42.    // Fractint parameters are:
  43.    //    type=mandel  
  44.    //    corners=-0.1992/-0.1099914/1.0000046/1.06707
  45.    //    float=yes
  46.    //    maxiter=1500
  47.    //    potential=255/2200/1000/16bit
  48.    //    savename=mtmand
  49.  
  50.    pot "mtmand.pot"
  51. // pot "mtmand.pot" smooth // <== try this for high resolution renders
  52. // gif "mtmand.gif" smooth // <== do this instead if no POT available
  53.    water_level 0.0
  54.  
  55.    pigment { White }
  56.    finish {
  57.       crand 0.025         // dither  - not used often, but this image needs it. 
  58.       ambient 0.2         // Very dark shadows
  59.       diffuse 0.8         // Whiten the whites
  60.       phong 0.75          // Fairly shiny
  61.       phong_size 100.0    // with tight highlights
  62.       specular 1.0
  63.       roughness 0.005
  64.    }
  65.  
  66.    scale <640, 256, 480>
  67.    scale <ScaleX, 0.5, ScaleZ> // Reduce the height, scale to 360 x 480 
  68.    translate <-180, 0.0, -240>  // Center the image by half of ScaleX and ScaleZ
  69. }
  70.  
  71. // Sky sphere 
  72. sphere { <0.0, 0.0, 0.0>, 1200.0
  73.    pigment {
  74.       gradient y     // Fade from yellow to orange to red to black 
  75.       color_map {
  76.          [0.00 0.10 color Yellow color Orange] // Yellow at horizon
  77.          [0.10 0.15 color Orange color Red]    // Fade to orange to red
  78.          [0.15 0.27 color Red   color Black ]  // then to dark red
  79.          [0.27 1.01 color Black  color Black ] // to Black at zenith
  80.       }
  81.       quick_color SummerSky
  82.       scale 1000                    // Big enough to surround the universe
  83.       translate <0.0, -240.0, 0.0>  // This ajusts for the viewer position 
  84.    }
  85.    finish {
  86.       ambient 1.0                 // Keep objects from casting shadows 
  87.       diffuse 0.0                 // All light comes from ambient sources 
  88.    }
  89. }
  90.  
  91.  
  92. // Planet
  93. sphere { <-95.0, 50.0, 600.0>, 35.0
  94.    pigment { PlanetColor }
  95.    normal {
  96.       bump_map {  // Bump texture with corresponding julia image
  97.          //    type=julia 
  98.          //    corners=-1.568/1.568/-1.176/1.176
  99.          //    params=-0.1545957/1.0335373 
  100.          //    float=yes 
  101.          //    maxiter=256
  102.          gif  "mtmandj.gif"
  103.          bump_size 15.0
  104.          interpolate 4.0  // Smooth the image
  105.       }
  106.        // mapped image is 1x1x1, with lower left corner at 0,0,0
  107.       translate <-0.5, -0.5, 0.0>        // Center the image at origin
  108.       scale <35.0, 35.0, 35.0>
  109.       rotate 95*z                        // Tweak the positioning a little
  110.    }
  111.    finish {
  112.       specular 0.35                    // Fairly "dull" surface
  113.       roughness 0.5                    // spread the highlight
  114.       ambient 0.0                      // Dark shadows
  115.       diffuse 0.75
  116.    }
  117. }
  118.  
  119. // end of file
  120.